﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UI_Game_QrCode : MonoBehaviour
{
    [SerializeField]
    private RawImage m_CodeImage;
    public void SetQrCode(string pCodeText)
    {
        var pQrCodeTexture = new Texture2D(256, 256);
        pQrCodeTexture.SetPixels32(UtilityFunctions.CreateCode(pCodeText, pQrCodeTexture.width, pQrCodeTexture.height));
        pQrCodeTexture.Apply();
        m_CodeImage.texture = pQrCodeTexture;
    }
}
